package com.imooc.validate;

import com.imooc.utils.NameUtil;
import com.imooc.utils.UrlUtil;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 * @Author : Kyle_Fu
 * @Date: 2023-05-22 19:27
 */
public class CheckNameValidate implements ConstraintValidator<CheckName, String> {

    @Override
    public boolean isValid(String name, ConstraintValidatorContext context) {

        return NameUtil.verifyName(name.trim());
    }
}
